uniform sampler2D bump_map;
uniform sampler2D lightmap1;
uniform sampler2D lightmap2;
uniform sampler2D lightmap3;

vec3 GetIllum()
{
	vec3 weight = texture2D(bump_map, gl_TexCoord[0].xy).xyz;
	vec4 lighttex = texture2D(lightmap1, gl_TexCoord[1].xy);
	vec3 light1 = lighttex.xyz;// * lighttex.w * 10.0;
	lighttex = texture2D(lightmap2, gl_TexCoord[1].xy);
	vec3 light2 = lighttex.xyz;// * lighttex.w * 10.0;
	lighttex = texture2D(lightmap3, gl_TexCoord[1].xy);
	vec3 light3 = lighttex.xyz;// * lighttex.w * 10.0;
	return light1*weight.x + 
		light2*weight.y +
		light3*weight.z; 
}